#!/bin/sh
#
# clean
#
# Copyright (C) 2016-2020 Wu Zhangjin <lzufalcon@163.com>
#

read -p 'This command is dangerous, are you sure? (yes/no) ' sure

[ "x$sure" != 'xyes' ] && exit 0

uname | grep -q MINGW && PWD_OPT="-W"
TOP_DIR="$(cd "$(dirname "$0")"/../../ && pwd $PWD_OPT)"
. "$TOP_DIR"/tools/docker/config $* >/dev/null

if [ -z "$filter" ]; then
  filter=$1
  [ -n "$2" ] && filter=$2
fi

deploy_do_clean $filter
